package com.zdb.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zdb.pojo.Article;
import com.zdb.pojo.dto.ArticleSearchDto;
import com.zdb.pojo.vo.ArticleVO;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

@Mapper
public interface ArticlesMapper extends BaseMapper<Article> {
    IPage<ArticleVO> getArticles(IPage<ArticleVO> page, @Param("dto") ArticleSearchDto dto);
    ArticleVO getArticleVoById(@Param("dto") ArticleSearchDto dto);

    void viewArticleIncrement(Integer id);


    void likeArticleDecrement(Integer id);

    void likeArticleIncrement(Integer id);

//    void collectingArticleDecrement(Integer id);
//
//    void collectingArticleincrement(Integer id);
}
